﻿using System.Collections.Generic;
using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.game
{
    public class UserGameEndInfoRet: Message
    {
        public static int TYPE = 12 ;
        public static int ID =  14 ;

        public int locationIndex { get; set; }
        public int id { get; set; }
        public string name { get; set; }
        public string avator { get;set;}
        public int winCounts { get; set; }
        public int defeatCounts { get; set; }
        public int totalScore { get; set;}

        public void decode(Input _in)
        {
            locationIndex = _in.readInt();
            id = _in.readInt();
            name = _in.readString();
            avator = _in.readString();
            winCounts = _in.readInt();
            defeatCounts = _in.readInt();
            totalScore = _in.readInt();
        }

        public void encode(Output _out)
        {        
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return string.Format("UserGameEndInfoRet[UserID={0}, id={1}, name={2}, avator={3}, winCounts={4}," +
                                 "defeatCounts={5}, totalScore={6}]",locationIndex,id,name,avator,winCounts,defeatCounts,totalScore);
        }
    }
}